3.1.12 \(\int \sinh (c+d x) (a+b \tanh ^2(c+d x))^2 \, dx\) [12]

Optimal. Leaf size=49 \[ \frac {(a+b)^2 \cosh (c+d x)}{d}+\frac {2 b (a+b) \text {sech}(c+d x)}{d}-\frac {b^2 \text {sech}^3(c+d x)}{3 d} \]

[Out]

(a+b)^2*cosh(d*x+c)/d+2*b*(a+b)*sech(d*x+c)/d-1/3*b^2*sech(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3745, 276} \begin {gather*} \frac {(a+b)^2 \cosh (c+d x)}{d}+\frac {2 b (a+b) \text {sech}(c+d x)}{d}-\frac {b^2 \text {sech}^3(c+d x)}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sinh[c + d*x]*(a + b*Tanh[c + d*x]^2)^2,x]

[Out]

((a + b)^2*Cosh[c + d*x])/d + (2*b*(a + b)*Sech[c + d*x])/d - (b^2*Sech[c + d*x]^3)/(3*d)

Rule 276

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 3745

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[(-1 + ff^2*x^2)^((m - 1)/2)*((a - b + b*ff^2*x^2)^p/x^(m
 + 1)), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \sinh (c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (a+b-b x^2\right )^2}{x^2} \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (-2 b (a+b)+\frac {(a+b)^2}{x^2}+b^2 x^2\right ) \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=\frac {(a+b)^2 \cosh (c+d x)}{d}+\frac {2 b (a+b) \text {sech}(c+d x)}{d}-\frac {b^2 \text {sech}^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.25, size = 46, normalized size = 0.94 \begin {gather*} \frac {3 (a+b)^2 \cosh (c+d x)+b \text {sech}(c+d x) \left (6 (a+b)-b \text {sech}^2(c+d x)\right )}{3 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sinh[c + d*x]*(a + b*Tanh[c + d*x]^2)^2,x]

[Out]

(3*(a + b)^2*Cosh[c + d*x] + b*Sech[c + d*x]*(6*(a + b) - b*Sech[c + d*x]^2))/(3*d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(97\) vs. \(2(47)=94\).
time = 1.39, size = 98, normalized size = 2.00

method result size
derivativedivides \(\frac {a^{2} \cosh \left (d x +c \right )+2 a b \left (\frac {\sinh ^{2}\left (d x +c \right )}{\cosh \left (d x +c \right )}+\frac {2}{\cosh \left (d x +c \right )}\right )+b^{2} \left (\frac {\sinh ^{4}\left (d x +c \right )}{\cosh \left (d x +c \right )^{3}}+\frac {4 \left (\sinh ^{2}\left (d x +c \right )\right )}{\cosh \left (d x +c \right )^{3}}+\frac {8}{3 \cosh \left (d x +c \right )^{3}}\right )}{d}\) \(98\)
default \(\frac {a^{2} \cosh \left (d x +c \right )+2 a b \left (\frac {\sinh ^{2}\left (d x +c \right )}{\cosh \left (d x +c \right )}+\frac {2}{\cosh \left (d x +c \right )}\right )+b^{2} \left (\frac {\sinh ^{4}\left (d x +c \right )}{\cosh \left (d x +c \right )^{3}}+\frac {4 \left (\sinh ^{2}\left (d x +c \right )\right )}{\cosh \left (d x +c \right )^{3}}+\frac {8}{3 \cosh \left (d x +c \right )^{3}}\right )}{d}\) \(98\)
risch \(\frac {{\mathrm e}^{d x +c} a^{2}}{2 d}+\frac {a b \,{\mathrm e}^{d x +c}}{d}+\frac {{\mathrm e}^{d x +c} b^{2}}{2 d}+\frac {{\mathrm e}^{-d x -c} a^{2}}{2 d}+\frac {{\mathrm e}^{-d x -c} a b}{d}+\frac {{\mathrm e}^{-d x -c} b^{2}}{2 d}+\frac {4 b \,{\mathrm e}^{d x +c} \left (3 a \,{\mathrm e}^{4 d x +4 c}+3 b \,{\mathrm e}^{4 d x +4 c}+6 a \,{\mathrm e}^{2 d x +2 c}+4 b \,{\mathrm e}^{2 d x +2 c}+3 a +3 b \right )}{3 d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{3}}\) \(171\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^2*cosh(d*x+c)+2*a*b*(sinh(d*x+c)^2/cosh(d*x+c)+2/cosh(d*x+c))+b^2*(sinh(d*x+c)^4/cosh(d*x+c)^3+4*sinh(d
*x+c)^2/cosh(d*x+c)^3+8/3/cosh(d*x+c)^3))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 171 vs. \(2 (47) = 94\).
time = 0.27, size = 171, normalized size = 3.49 \begin {gather*} \frac {1}{6} \, b^{2} {\left (\frac {3 \, e^{\left (-d x - c\right )}}{d} + \frac {33 \, e^{\left (-2 \, d x - 2 \, c\right )} + 41 \, e^{\left (-4 \, d x - 4 \, c\right )} + 27 \, e^{\left (-6 \, d x - 6 \, c\right )} + 3}{d {\left (e^{\left (-d x - c\right )} + 3 \, e^{\left (-3 \, d x - 3 \, c\right )} + 3 \, e^{\left (-5 \, d x - 5 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )}\right )}}\right )} + a b {\left (\frac {e^{\left (-d x - c\right )}}{d} + \frac {5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 1}{d {\left (e^{\left (-d x - c\right )} + e^{\left (-3 \, d x - 3 \, c\right )}\right )}}\right )} + \frac {a^{2} \cosh \left (d x + c\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")

[Out]

1/6*b^2*(3*e^(-d*x - c)/d + (33*e^(-2*d*x - 2*c) + 41*e^(-4*d*x - 4*c) + 27*e^(-6*d*x - 6*c) + 3)/(d*(e^(-d*x
- c) + 3*e^(-3*d*x - 3*c) + 3*e^(-5*d*x - 5*c) + e^(-7*d*x - 7*c)))) + a*b*(e^(-d*x - c)/d + (5*e^(-2*d*x - 2*
c) + 1)/(d*(e^(-d*x - c) + e^(-3*d*x - 3*c)))) + a^2*cosh(d*x + c)/d

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (47) = 94\).
time = 0.33, size = 167, normalized size = 3.41 \begin {gather*} \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{4} + 12 \, {\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 6 \, {\left (3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, a^{2} + 8 \, a b + 6 \, b^{2}\right )} \sinh \left (d x + c\right )^{2} + 9 \, a^{2} + 42 \, a b + 25 \, b^{2}}{6 \, {\left (d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + 3 \, d \cosh \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")

[Out]

1/6*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 3*(a^2 + 2*a*b + b^2)*sinh(d*x + c)^4 + 12*(a^2 + 4*a*b + 3*b^2)*
cosh(d*x + c)^2 + 6*(3*(a^2 + 2*a*b + b^2)*cosh(d*x + c)^2 + 2*a^2 + 8*a*b + 6*b^2)*sinh(d*x + c)^2 + 9*a^2 +
42*a*b + 25*b^2)/(d*cosh(d*x + c)^3 + 3*d*cosh(d*x + c)*sinh(d*x + c)^2 + 3*d*cosh(d*x + c))

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \sinh {\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)**2)**2,x)

[Out]

Integral((a + b*tanh(c + d*x)**2)**2*sinh(c + d*x), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (47) = 94\).
time = 0.46, size = 139, normalized size = 2.84 \begin {gather*} \frac {3 \, a^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} + 6 \, a b {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} + \frac {8 \, {\left (3 \, a b {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} - 2 \, b^{2}\right )}}{{\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{3}}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sinh(d*x+c)*(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")

[Out]

1/6*(3*a^2*(e^(d*x + c) + e^(-d*x - c)) + 6*a*b*(e^(d*x + c) + e^(-d*x - c)) + 3*b^2*(e^(d*x + c) + e^(-d*x -
c)) + 8*(3*a*b*(e^(d*x + c) + e^(-d*x - c))^2 + 3*b^2*(e^(d*x + c) + e^(-d*x - c))^2 - 2*b^2)/(e^(d*x + c) + e
^(-d*x - c))^3)/d

________________________________________________________________________________________

Mupad [B]
time = 0.19, size = 154, normalized size = 3.14 \begin {gather*} \frac {{\mathrm {e}}^{c+d\,x}\,{\left (a+b\right )}^2}{2\,d}+\frac {{\mathrm {e}}^{-c-d\,x}\,{\left (a+b\right )}^2}{2\,d}+\frac {8\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,{\mathrm {e}}^{c+d\,x}\,\left (b^2+a\,b\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {8\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sinh(c + d*x)*(a + b*tanh(c + d*x)^2)^2,x)

[Out]

(exp(c + d*x)*(a + b)^2)/(2*d) + (exp(- c - d*x)*(a + b)^2)/(2*d) + (8*b^2*exp(c + d*x))/(3*d*(3*exp(2*c + 2*d
*x) + 3*exp(4*c + 4*d*x) + exp(6*c + 6*d*x) + 1)) + (4*exp(c + d*x)*(a*b + b^2))/(d*(exp(2*c + 2*d*x) + 1)) -
(8*b^2*exp(c + d*x))/(3*d*(2*exp(2*c + 2*d*x) + exp(4*c + 4*d*x) + 1))

________________________________________________________________________________________